package com.czk.transational;


import com.czk.utils.Task;

public class CzkTransaction {

    private String groupId;
    private String transactionId;
    private CzkTransactionType czkTransactionType;   // commit-待提交，rollback-待回滚
    private Task task = new Task();

    public CzkTransaction(String groupId, String transactionId) {
        this.groupId = groupId;
        this.transactionId = transactionId;
        this.task = new Task();
    }

    public CzkTransaction(String groupId, String transactionId, CzkTransactionType czkTransactionType) {
        this.groupId = groupId;
        this.transactionId = transactionId;
        this.czkTransactionType = czkTransactionType;
    }

    public Task getTask() {
        return task;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public CzkTransactionType getCzkTransactionType() {
        return czkTransactionType;
    }

    public void setCzkTransactionType(CzkTransactionType czkTransactionType) {
        this.czkTransactionType = czkTransactionType;
    }
}
